package v1

import (
	"github.com/gin-gonic/gin"
	"hytx_media/pkg/app"
	"net/http"
	"hytx_media/pkg/e"
	"hytx_media/service/article_service"
)


func GetArticleCategory(c *gin.Context) {
	appG := app.Gin{C: c}

	var (
		id         int
		title      string
		sort       int
		created_at string
	)

	articleCategoryService := article_service.ArticleCategory{
		Id:        id,
		Title:     title,
		Sort:      sort,
		CreatedAt: created_at,
	}
	articleCategory, err := articleCategoryService.GetAll()
	if err != nil {
		appG.Response(http.StatusOK, e.INVALID_PARAMS, nil)
	}
	data := make(map[string]interface{})
	data["lists"] = articleCategory
	appG.Response(http.StatusOK, e.SUCCESS, data)
}
